﻿@using ZhongKeSite.Entity
@{
    ViewBag.Title = "新增单页";
}
@model SinglePage
<style>
    html {
        background-color: #fff;
    }

    .layui-card {
        box-shadow: none;
    }
</style>
<!-- 配置文件 -->
<script type="text/javascript" src="~/lib/ueditor1.4.3/ueditor.config.js"></script>
<!-- 编辑器源码文件 -->
<script type="text/javascript" src="~/lib/ueditor1.4.3/ueditor.all.js"></script>
<!-- 编辑器源码文件 -->
<script type="text/javascript" src="~/lib/ueditor1.4.3/lang/zh-cn/zh-cn.js"></script>

<div class="layui-card">
    <div class="layui-card-body">
        <form class="layui-form" action="@Url.Action("SinglePageAdd","Basis",new { area = "Admin"})" lay-filter="useradd-form">
            <div class="layui-form-item">
                <label class="layui-form-label">标题*</label>
                <div class="layui-input-block">
                    <input type="text" name="Title" lay-verify="required" placeholder="标题" autocomplete="on" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">单页类型*</label>
                <div class="layui-input-block">
                    <select name="SingPageType" lay-filter="SingPageType" lay-verify="required">
                        @foreach (var item in (IEnumerable<SelectListItem>)ViewBag.SinglePageTypeDLL)
                        {
                            <option value="@item.Value">@item.Text</option>
                        }
                    </select>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">排序号</label>
                <div class="layui-input-block">
                    <input type="text" name="SortNo" value="1000" lay-verify="required" placeholder="排序号" autocomplete="on" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">内容*</label>
                <div class="layui-input-block">
                    <!-- 加载编辑器的容器 -->
                    <script id="container" name="Content" type="text/plain">
                    </script>
                </div>
            </div>
            <div id="useradd-submit" lay-submit lay-filter="useradd-submit"></div>
        </form>
    </div>
</div>
<script>
    var ue = UE.getEditor('container');

    layui.use(['form'], function () {
        var $ = layui.$, form = layui.form;

        form.render(null, 'useradd-form');
    });
</script>
